package cn.funeralobjects.asms.entity;

import cn.funeralobjects.asms.converter.TemplateStatusConverter;
import cn.funeralobjects.asms.converter.TemplateTypeConverter;
import cn.funeralobjects.common.annotations.Code;
import cn.funeralobjects.common.annotations.Name;
import cn.funeralobjects.utils.aliyun.sms.enums.TemplateStatus;
import cn.funeralobjects.utils.aliyun.sms.enums.TemplateType;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.persistence.*;

/**
 * Entity Of SmsTemplate
 *
 * @author FuneralObjects
 * Create date: 2020/5/31 5:35 PM
 */
@Data
@Accessors(chain = true)
@Table(name = "t_sms_template")
@Entity
public class ESmsTemplate {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    @Code
    private String templateCode;
    private String templateContent;
    @Name
    private String templateName;
    @Convert(converter = TemplateStatusConverter.class)
    private TemplateStatus status;
    private String reason;
    @Convert(converter = TemplateTypeConverter.class)
    private TemplateType type;
    private String createDate;
    private String prodResCode;
}
